﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using PhanMemDoVui.BusinessLogic;

namespace PhanMemDoVui
{
    public partial class frmEndExam : Form
    {
        public frmEndExam()
        {
            InitializeComponent();
        }

        private void Form9_Load(object sender, EventArgs e)
        {
            ExamBUS exam = ExamBUS.Instance();
            lab_score.Text = (exam.LayDiem()).ToString();
        }

        private void btn_back_Click(object sender, EventArgs e)
        {
            UserBUS user = UserBUS.Instance();
            if (user.IsAdmin() == false)
            {
                frmCommonUser comm = new frmCommonUser();
                this.Hide();
                comm.Show();
            } 
            else
            {
                frmAdmin admin = new frmAdmin();
                this.Hide();
                admin.Show();
            }
        }

        private void frmEndExam_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }
    }
}
